package com.example.util;/**
 * @author wangXiao
 */

import com.example.entity.ConfigBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;

/**
 * @Description: TODO
 * @Author wangXiao
 * @Date 2022/8/26 
 **/
@Configuration
public class ConfigClass {

    @Bean
    @DependsOn("configBean")
    public ConfigUtil dependMethod(ConfigBean configBean){
        ConfigUtil configUtil = new ConfigUtil();
        System.out.println(configBean.getConfigName());
        configUtil.setConfigBean(configBean);
        return  configUtil;
    }
}
